#!/usr/bin/ruby -w

require 'net/smtp'

class Reminder
  def initialize(subm, subj)
    @submitter = subm
    @subject = subj
  end
  
  def send
#   t = [id, submitter, subject, date]
    what = "From: remind@task.noneo.is-a-geek.org\n"
    what += "To: " + @submitter + "\n"
    what += "Subject: " + @subject + "\n\n"
    what += "Task description: " + @subject + "\n"
    Net::SMTP.start('localhost', 25) do |smtp|
      smtp.send_message(what, 'remind@task.noneo.is-a-geek.org', @submitter)
    end
  end
end
